#ifndef DAQ217_H
#define DAQ217_H

#include "libdaq/device/DAQ216/DAQ216.h"

namespace libdaq{
namespace device{
class DAQ217 : public DAQ216
{
public:
  DAQ217();
  ~DAQ217() override;

  bool InitializeDevice() override;
  bool ConnectedDevice() override;

  static backend::USBOption GetUSBOption() { return libdaq::backend::USBOption(DAQ216_USB_VENDOR_ID, DAQ216_USB_PRODUCT_ID, DAQ216_USB_END_POINT_IN, DAQ216_USB_END_POINT_OUT); }

  bool ForceStopADCCollection() override;

  virtual bool ConfigADCTrigger(LockzhinerADCTriggerType type,
                     LockzhinerADCTriggerMode mode,
                     LockzhinerADCChannel channel,
                     int level);

  virtual bool ConfigSaveOffsetCalibrationX1(const std::vector<uint8_t> &state); // 保存偏移校正参数x1档
  virtual bool ConfigSaveOffsetCalibrationX10(const std::vector<uint8_t> &state); // 保存偏移校正x10档
  virtual bool ConfigSaveGainCalibrationX1(const std::vector<uint8_t> &state); // 保存增益校正x1档
  virtual bool ConfigSaveGainCalibrationX10(const std::vector<uint8_t> &state); // 保存增益校正x10档

protected:
  bool ParseCommandPacket(std::vector<unsigned char> &temp_parse_buffer, unsigned char &packet_index) override; // 解析命令包
  bool ParseDataPacket(std::vector<unsigned char> &temp_parse_buffer, unsigned char &packet_index) override ; // 解析数据包

  virtual bool SendSaveOffsetCalibrationX1(const std::vector<uint8_t> &state); // 保存偏移校正x1档
  virtual bool SendSaveOffsetCalibrationX10(const std::vector<uint8_t> &state); // 保存偏移校正x10档
  virtual bool SendSaveGainCalibrationX1(const std::vector<uint8_t> &state); // 保存增益校正x1档
  virtual bool SendSaveGainCalibrationX10(const std::vector<uint8_t> &state); // 保存增益校正x10档

  virtual bool SendConfigTrigger(LockzhinerADCTriggerType type,
                         LockzhinerADCTriggerMode mode,
                         LockzhinerADCChannel channel,
                         int level); // 设置触发方式、触发模式、触发通道


};
}
}

#endif // DAQ217_H
